<?php
class receipt extends adminBase {
    function __construct() {
        parent::__construct();
        $this->cms->setPageTitle("回复管理");

        $this->fieldAdd("id","ID",self::TYPE_PRIMARY,self::TABLE_STRING,self::FORM_HIDDEN);
        $this->fieldAdd("title","标题",self::TYPE_VARCHAR,self::TABLE_STRING,self::FORM_TEXT);
        $this->fieldAdd("content","内容",self::TYPE_VARCHAR,self::TABLE_STRING,self::FORM_TEXT);
        $this->fieldAdd("owner","发布人",self::TYPE_FOREIGN,self::TABLE_MODE,self::FORM_NONE)
            ->fieldModify("owner",array(
                "mode"=>$this->user,
                "showFunction"=>function($data,$config){
                    return $data['user'];
                }
            ));

        $this->mode=ArticleModule::init("receipt");
        $this->addControl(false, true);
    }
}